extends Node

@onready var timer: Timer = $Timer

@onready var color_rect: ColorRect = $ColorRect
signal Scene_change

var the_main : Node2D = null
var the_begin_perform = preload("res://scenes/begin_perform.tscn")
var home = preload("res://scenes/Home 01.tscn")
var home02 = preload("res://scenes/home02.tscn")

var have_been_to_home: bool = false

func _ready() -> void:
	the_main = $Node2D

func _on_node_2d_start_game() -> void:
	the_main.queue_free()
	var new_begin_perform = the_begin_perform.instantiate()
	add_child(new_begin_perform)
	timer.start()


func _on_timer_timeout() -> void:
	var new_home = home.instantiate()
	add_child(new_home)


func _on_first_part_over_over() -> void:
	print("发出信号")
	Scene_change.emit()


func _on_windows_return_home() -> void:
	var new_home_02 = home02.instantiate()
	add_child(new_home_02)
	pass # Replace with function body.
